//
//  MessageViewController.m
//  easystudy
//
//  Created by kane on 15/6/4.
//  Copyright (c) 2015年 kane. All rights reserved.
//

#import "MessageViewController.h"

@interface MessageViewController ()<UITableViewDataSource,UITableViewDelegate>
{
    __weak IBOutlet UITableView *_messageTable;
    
    __weak IBOutlet UIButton *_personButton;
    __weak IBOutlet UIButton *_systemButton;
    __weak IBOutlet UILabel *_selLineView;
}

@end

@implementation MessageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark - User Actions
- (IBAction)backBtnPressed:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)personBtnPressed:(id)sender {
    _personButton.selected = YES;
    _systemButton.selected = NO;
    _selLineView.center = CGPointMake(_personButton.center.x, _selLineView.center.y);
}

- (IBAction)systemBtnPressed:(id)sender {
    
    _personButton.selected = NO;
    _systemButton.selected = YES;
    _selLineView.center = CGPointMake(_systemButton.center.x, _selLineView.center.y);
}

#pragma mark - UITableView DataSource && Delegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *identifier = @"SearchClassCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    UIImageView *imgView;
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        imgView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 2, fWidth_Current-20, 75)];
        [cell.contentView addSubview:imgView];
    }
    imgView.image = [UIImage imageNamed:indexPath.row == 0? @"main_image01.png":@"main_image02.png"];
    
    return cell;
}

@end
